1. Technical Field
The present invention relates generally to the field of computer software and, more particularly, to monitoring changes to environment variables.
2. Description of Related Art
Computer use has increased exponentially during the past several years. Much of this growth has been due to the increasing use of personal computers for home use due to recent sharp decreases in the price of computers as technology advances. This increase in the number of computers in use has also been spurred by the recent explosion of the Internet.
Thus large numbers of people with little or no computer expertise are interacting with computers on a daily basis. Novice users are purchasing and loading software applications onto their computers from a variety of sources without regard for what other software applications may exist on their computer and without regard as to how the different software applications will integrate with each other. Many of these software applications include and use some of the same executable files as other software applications already loaded onto the user's computer. When a new software application is loaded, the user may end up having multiple copies of the same executable file stored in different locations in the user's computer. However, the two copies of the executable file may be different versions.
Thus, if one software application attempts to run the wrong version of the executable file, problems may occur. The problem of duplicate files is not limited to situations arising from inexperienced computer users as discussed above. Duplicate files also may pose a problem to even more sophisticated computer users. For example, a user may, for various reasons, expressly desire to have multiple versions of a software application or data file available on the computer. However, ensuring that the proper file is selected is still a problem.
One reason some software errors occur due to the existence of duplicate files is that the incorrect one is often selected due to the order of the directories in an environment variable. For example, assume that the PATH environment variable is defined as “PATH=C:\x\bin;C:\y\bin” and a.exe exists in both C:\x\bin and C:\y\bin. When the user executes a.exe, the one in the C:\x\bin directory will be used. In some cases, this is exactly what the users desires. However, in other cases, the user wishes to execute C:\y\bin\a.exe, but the user is unaware that a.exe also exists in C:\x\bin.
Thus, duplicate files can cause numerous problems and often these problems are very difficult to debug. Therefore, it would be desirable to have a method, system, and apparatus for managing the path sequence of environment variables to prevent the existence of duplicate path sequences in an environment variable.